package designpattern.Observer;

/**
 * @author cyt
 * @create 2020-08-13 13:54
 */
public class ObserverTest {
    public static void main(String[] args) {
        Admin admin = new Admin();
        Customer customer = new Customer();
        Store store = new Store();
        store.addProductObserver(admin);
        store.addProductObserver(customer);
        Product product = new Product("cyt","100");

        store.addProduct(product);
        store.setProductPrice("cyt", "22");
    }

}
